package collection;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ListTest {
public static void main(String[] args) {
	List<Integer>list=new ArrayList<>();
	list.addAll(Arrays.asList(1,2,3,4,5,6,7));
	for(Integer integer:list){
		Integer i=list.size();
		System.out.println(integer);
		System.out.println(list.remove(i-2));
	}
}
}
